// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// element ui的引入
// ----------------------------------------
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// ----------------------------------------
// iView ui的引入
// ----------------------------------------
import iView from 'iview'
import 'iview/dist/styles/iview.css'
// ----------------------------------------
// 富文本的引入
import VueQuillEditor from 'vue-quill-editor'
import * as Quill from 'quill' // 引入编辑器
import resizeImage from 'quill-image-resize-module' // 图片缩放组件。
import {
  ImageDrop
} from 'quill-image-drop-module'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css' // 图片拖动组件。
Quill.register('modules/imageDrop', ImageDrop)
Quill.register('modules/resizeImage ', resizeImage)
// -------------------------------------------------
//VUEX的注册
import store from './store'
//--------------------------------------------------
//axios的注册
import axios from 'axios'
Vue.prototype.$http = axios
//-------------------------------------------------
//懒加载
import VueLazyload from 'vue-lazyload'
// 使用VueLazyload并传入相应的配置
Vue.use(VueLazyload, {
  error: 'dist/error.png',
  loading: 'dist/loading.gif',// 懒加载使用的图片
})
//-------------------------------------------------
Vue.use(VueQuillEditor)
Vue.use(ElementUI)
Vue.use(iView)
// Vue.use(quillEditor)
Vue.config.productionTip = false
 
// 设置浏览器标题
Vue.directive('title', {
  inserted: function (el, binding) {
    document.title = el.dataset.title
  }
})
//--------------------------------------------------
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  template: '<App/>'
})
